;(function(){document.addEventListener('DOMContentLoaded',function(){if(window.innerWidth<960){setTimeout(()=>{new Swiper('.swiper-container',{slidesPerView:1,centeredSlides:true,loop:true,autoplay:{autoplay:true,delay:3000,},breakpoints:{1024:{pagination:{el:'.swiper-pagination',type:'bullets',clickable:true,},},},})},1000)}else{function handleClass(ele,reg,newcls){ele.className=ele.className.replace(reg,'')
ele.className+=' '+newcls}
const qrcode=document.querySelector('.staking-qrcode')
const qrcodeImg=document.querySelector('.staking-qrcode img')
const stakeNow=document.querySelector('.stake-now.desktop')
const banner=document.querySelector('.banner-img')
let tick=null
if(!stakeNow)return
stakeNow.addEventListener('mouseover',function(){handleClass(qrcodeImg,/ fade-out/g,'fade-in-qrcode')
handleClass(qrcode,/ fade-out/g,'fade-in')
qrcode.setAttribute('style','display:block')
handleClass(banner,/ fade-in-half/g,'fade-out-half')
if(tick){clearTimeout(tick)}})
stakeNow.addEventListener('mouseout',function(event){handleClass(qrcode,/ fade-in/g,'fade-out')
handleClass(qrcodeImg,/ fade-in-qrcode/g,'fade-out')
tick=setTimeout(()=>{qrcode.setAttribute('style','display:none')},500)
handleClass(banner,/ fade-out-half/g,'fade-in-half')},true,)}})})()